class Hero:
    hp = 0

    power = 0
    hero_name = ""

    def fight(self, enemy_hp, enemy_power, enemy_name):
        """

        :param enemy_hp:  敌人的血量
        :param enemy_power: 敌人攻击力
        :param hero_name: 英雄名字
        :return:
        """

        hero_final_hp = self.hp - enemy_power
        enemy_final_hp = enemy_hp - self.power
        if hero_final_hp > enemy_final_hp:
            print(f"{self.hero_name}赢了")
        elif hero_final_hp < enemy_final_hp:
            print(f"{enemy_name}赢了")
        else:
           print("双方平局")

class Timo(Hero):
    hp=1800
    power=1800
    hero_name="Timo"

class Police(Hero):
    hp=9000
    power=1802
    hero_name="Police"


